package com.aigou.admin.service;

import com.aigou.admin.entity.PageEntity;
import com.aigou.admin.entity.User;

import java.util.List;

/**
 * @Author: Hor
 * @Date: 2024/11/29 09:29
 * @Version: 1.0
 */
public interface UserService {

    List<User> findAll();
    User findById(String id);
    Boolean save(User user);
    Boolean update(User user);
    Boolean remove(String id);

    User findByUsername(String username);
    User login(String username, String password);


    /**
     * 分页查询用户
     *
     * @param currentPage 当前页
     * @param pageSize 每页数量
     * @return PageEntity<User>
     */
    PageEntity<User> findUsersByPage(Integer currentPage, Integer pageSize,String username);

}
